package com.itheima.itheima_03;

public class BBB implements Runnable {
    @Override
    public void run() {

        while(true){
            //同步代码块
            synchronized ("右筷子"){
                System.out.println("佘海涛拿起了右筷子");

                //同步代码块
                synchronized ("左筷子"){
                    System.out.println("佘海涛拿起了左筷子");

                    System.out.println("佘海涛大吃一口！！！");
                }
            }
        }
    }
}
